package com.zzk.protect.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;

/**
 * 
 * @TableName daily_settlement
 */
@TableName(value ="daily_settlement")
public class DailySettlement {
    /**
     * Primary key ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * Cashier ID
     */
    @TableField(value = "cashier_id")
    private Integer cashierId;

    /**
     * Start time
     */
    @TableField(value = "start_time")
    private Date startTime;

    /**
     * End time
     */
    @TableField(value = "end_time")
    private Date endTime;

    /**
     * Primary key ID
     */
    public Integer getId() {
        return id;
    }

    /**
     * Primary key ID
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * Cashier ID
     */
    public Integer getCashierId() {
        return cashierId;
    }

    /**
     * Cashier ID
     */
    public void setCashierId(Integer cashierId) {
        this.cashierId = cashierId;
    }

    /**
     * Start time
     */
    public Date getStartTime() {
        return startTime;
    }

    /**
     * Start time
     */
    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    /**
     * End time
     */
    public Date getEndTime() {
        return endTime;
    }

    /**
     * End time
     */
    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DailySettlement other = (DailySettlement) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCashierId() == null ? other.getCashierId() == null : this.getCashierId().equals(other.getCashierId()))
            && (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime()))
            && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCashierId() == null) ? 0 : getCashierId().hashCode());
        result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
        result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", cashierId=").append(cashierId);
        sb.append(", startTime=").append(startTime);
        sb.append(", endTime=").append(endTime);
        sb.append("]");
        return sb.toString();
    }
}